 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 <div id="dialog-message">
 <form id="register_from_dict">
	<input type="hidden" id="table_id" value="${param.table_id}">
	 <table>
		 <tr>
	 		<td >
		 		<fieldset>
					<label>名称：</label>
					<input type="text" id="dictName" value="" name="dictName" require='true' meth="notNull" maxlength="30"  title="字典名称不能为空" />				
				</fieldset>
				<span dict="help-block"></span> 
	 		</td> 
	 	</tr>  
	 	<tr>
	 		<td >
	 		<fieldset> 
				 标识：&nbsp;&nbsp;
				   <div style="float:right;width:155px;">
 					<select dict="width-155 form-control" style="width:155px" id="dictSign">
						<option value="allLv">年级</option>
						<option value="jiaocai">教材</option>
				    </select>
				</div>	
				<span dict="help-block"></span> 
			</fieldset>
	 		</td> 
	 	</tr> 
	 	<tr>
	 		<td >
	 		<fieldset>
				<label>值1：</label>
				<input type="text" id="value1" value=""  name="value1" require='true' meth="notNull" maxlength="30"  title="值1不能为空" />
				<span dict="help-block"></span> 
			</fieldset>
	 		</td> 
	 	</tr> 
	 	<tr>
	 		<td >
	 		<fieldset>
				<label>值2：</label>
				<input type="text" id="value2" value=""  name="value2" require='true' meth="notNull" maxlength="30"  title="值2不能为空" />
				<span dict="help-block"></span> 
			</fieldset>
	 		</td> 
	 	</tr> 
	 	 
	 	 <tr>
	 		<td >
	 		<fieldset>
				<label>值3：</label>
				<input type="text" id="value3" value=""  name="value3" require='true' meth="notNull" maxlength="30"  title="值3不能为空" />
				<span dict="help-block"></span> 
			</fieldset>
	 		</td> 
	 	</tr>  
	 </table>  
	 
</form>	
</div>
<script type="text/javascript">
(function(){
	
	
	function adddict(contorl){
		var a =$("#register_from_dict").hzValidate("init");  
		if(a==false){
			return;
		} 
		var object = OAajaxSubmit("register_from_dict"); 
		 	//alert(obj2str(object));
			$.ajax({
			   type: "POST",
				url: "${pageContext.request.contextPath}/edu/dictAction.do?method=addDict&r="+Math.random(),
				data: object,
				dataType:'json',
			   success: function(msg){ 
			    	if(msg.code=="1"){
			    		alert(msg.message); 
			    		$(contorl).dialog("close"); 
			    	}else{
			    		alert(msg.message);
			    	}
			   }
			}); 
	} 
	//计算当前页面状态
	$(function(){ 
		 
		 
	});
	window.dictAdd={};
	window.dictAdd.adddict = adddict;
})();
</script>
 